home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 658 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: vb.franken.de!volker
  2. From: volker@vb.franken.de (Volker Barthelmann)
  3. Subject: Re: PPC compilers
  4. Newsgroups: comp.sys.amiga.programmer
  5. References: <4com6v$415@maureen.teleport.com> <jasonb.821098303@cs.uwa.edu.au> <volker.0e58@vb.franken.de> <jasonb.821177376@cs.uwa.edu.au>
  6. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  7. Message-ID: <volker.0e5y@vb.franken.de>
  8. Date: 10 Jan 96 01:41:04 MET
  9. Organization: home
  10.  
  11. Jason S Birch (jasonb@cs.uwa.edu.au) wrote:
  12. :
  13. : How about bitfields? They can hide information about what particular
  14. : bits are used for, and their order in the structure.
  15.  
  16. Many HLLs do not have something like bitfields. Also C's definition is
  17. not very precise.
  18.  
  19. And, most important, You cannot declare every possible hardware registers
  20. with bitfields (e.g. if one value crosses a word boundary).
  21.  
  22. : >You sometimes need to know it in HLLs, too. Numerical calculations almost
  23. : >always need very detailed information on the data types. Just have a look
  24. : >at a C compiler's float.h.
  25. :
  26. : I wouldn't say "almost always" - in any case, by using the #defined
  27. : labels, you are *still* portable and hiding the implementation details
  28. : from yourself.
  29.  
  30. Often it's not possible to write really portable code with floating point
  31. calculations. Of course almost all common systems seem to use IEEE and
  32. therefore no problems occur.
  33.  
  34. : >In many cases You can forget such things after the declaration, but there
  35. : >are lots of other cases, too.
  36. :
  37. : Perhaps, but I'll wager they're extremely rare - with assembler, which
  38.  
  39. I wouldn't say "extremely rare". :-)
  40.  
  41. : is what the discussion was about, you constantly need to remind
  42. : yourself of those implementation details, and consistently get it
  43. : right.
  44.  
  45. Yes.
  46.  
  47. Volker
  48.  
  49.